<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>

    <body>
        <div id="user_info"></div>
    </body>
    <script type="text/tmplate" id="tmplate">
        <div>
            <ul>
                <li>姓名：{{name}}</li>
                <li>年龄：{{age}}</li>
                <li>电话：{{phone}}</li>
            </ul>
        </div>
    </script>

    <script type="application/javascript">
        //实例参数
        var user = { name: "陈立明", age: 23, phone: "15932582632"};
        //模板
        var template = document.getElementById("tmplate").innerHTML;

        document.getElementById("user_info").innerHTML = template;
    </script>
</html>
